#include <iostream>


class Building {
    // goodCay全局函数是 Building好朋友，可以访问Building中私有成员
    friend void goodGay(Building *building); // 全局函数友元

public:
    std::string sittingRoom; // 客厅

private:
    std::string bedRoom; // 卧室

public:
    Building() : sittingRoom("客厅"), bedRoom("卧室") {

    }
};

void goodGay(Building *building) {
    std::cout << building->sittingRoom << std::endl;
    std::cout << building->bedRoom << std::endl;
}

void test01() {
    Building building;
    goodGay(&building);
}

int main() {
    test01();
    return 0;
}

